var departmentFunction = {
	saveWindow : function(depId){
		new WindowPanel({
			id : 'saveDepartment',
			title:'添加部门',
			width:420,
			height:200,
			html : '<iframe name="saveDepartment" id="saveDepartment" src="'+path+'/system/department/toSave.action?departmentId='+depId+'" frameborder="0"></iframe>',
			toolBar : new ToolBar({
				items:[{
					text : '保存',
					pic : 'add',
					userable:'true',
					handler : function(){
						$(window.frames["saveDepartment"].document).find("#form").submit();
					}	
			}]
			})
		});
	},
	updateWindow : function(depId){
		new WindowPanel({
			id : 'updateDepartment',
			title:'修改部门',
			width:420,
			height:200,
			html : '<iframe name="updateDepartment" id="updateDepartment" src="'+path+'/system/department/toUpdate.action?department.id='+depId+'" frameborder="0"></iframe>',
			toolBar : new ToolBar({
				items:[{
					text : '修改',
					pic : 'edit',
					userable:'true',
					handler : function(){
						$(window.frames["updateDepartment"].document).find("#form").submit();
					}	
			}]
			})
		});
	}
}